home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_meroeambients.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  102 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_MeroeAmbients.cog
  4. #
  5. # Plays a random sound at random intervals with random volume and panning
  6. # Adjusted from generic cog to account for being underground or overground
  7. #
  8. # [SXC]    + [RKD]
  9. #
  10. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14. message    startup
  15. message    timer
  16. message    crossed
  17.  
  18. # adjoins en route to underground
  19. surface    enter1    linkid=1
  20. surface    enter2    linkid=1
  21. surface    enter3    linkid=1
  22. surface    enter4    linkid=1
  23. surface    enter5    linkid=1
  24. surface    enter6    linkid=1
  25.  
  26. # adjoins en route to exterior
  27. surface    exit1    linkid=0
  28. surface    exit2    linkid=0
  29. surface    exit3    linkid=0
  30. surface    exit4    linkid=0
  31. surface    exit5    linkid=0
  32. surface    exit6    linkid=0
  33.  
  34. # exterior ambients
  35. sound    extamb0=fol_sp_hitearth.wav    local
  36. sound    extamb1=shw_amb1.wav        local
  37. sound    extamb2=fol_cb_walk1.wav    local
  38. sound    extamb3=tem_wind01_c.wav    local
  39. sound    extamb4=tem_wind02_c.wav    local
  40. sound    extamb5=tem_wind03_c.wav    local
  41. sound    extamb6=tem_wind04_c.wav    local
  42. sound    extamb7=tem_wind05_c.wav    local
  43.  
  44. # interior ambients
  45. sound    intamb0=nub_ambient4_a.wav        local
  46. sound    intamb1=nub_ambient5_a.wav        local
  47. sound    intamb2=gen_amb_eerie_01.wav    local
  48. sound    intamb3=gen_amb_eerie_02.wav    local
  49. sound    intamb4=gen_amb_eerie_03.wav    local
  50. sound    intamb5=gen_amb_eerie_05.wav    local
  51. sound    intamb6=gen_amb_eerie_06.wav    local
  52. sound    intamb7=gen_amb_eerie_10.wav    local
  53. sound    intamb8=shw_amb2.wav            local
  54. sound    intamb9=shw_amb3.wav            local
  55. sound    intamb10=shw_amb5.wav            local
  56. sound    intamb12=teo_gen_a1.wav            local
  57. sound    intamb13=teo_gen_a4.wav            local
  58. sound    intamb14=teo_gen_a6.wav            local
  59.  
  60. flex    minInterval=4        local
  61. flex    rangeInterval=10    local
  62. flex    minVolume=0.4        local
  63. flex    rangeVolume=1.2        local
  64.  
  65. end
  66.  
  67. code
  68.  
  69. # ........................................................................................
  70.  
  71. startup:
  72.     SetTimer(25);
  73.  
  74.     # global11 = 0 when player is outside of pyramids
  75.     global11 = 0;
  76.     
  77.     return;
  78.  
  79. # ........................................................................................
  80.  
  81. crossed:
  82.     # Global11 set to 1 if player goes to pyramid interiors
  83.     global11 = GetSenderID();
  84.     return;
  85.  
  86. # ........................................................................................
  87.  
  88. timer:
  89.     if (global11 == 1)
  90.     {
  91.         PlaySoundLocal(intamb0[RandBetween(0, 14)], (minVolume + (rand() * rangeVolume)), ((rand() *2) - 1.0), 0x0, 0);
  92.     }
  93.     else
  94.     {
  95.         PlaySoundLocal(extamb0[RandBetween(0, 7)], (minVolume + (rand() * rangeVolume)), ((rand() *2) - 1.0), 0x0, 0);
  96.     }
  97.     
  98.     SetTimer(minInterval + (rand() * rangeInterval));
  99.     return;
  100. end
  101.  
  102.